package com.fengzheng.basic.common.config.response;

/**
 * @author liht
 * @date 2022/3/31 2:04 下午
 */
public enum ResultCodeMsg {

    FAIL(0,"操作失败"),
    SUCCESS(1,"操作成功"),
    SYSTEM_ERROR(500,"系统异常"),
    API_NOT_FOUND(404,"接口不存在"),
    NOT_LOGIN(401,"未登陆"),
    NOT_PERMISSION(403,"权限不足"),
    LOGIN_FAIL(0,"登陆失败，用户名密码不正确"),

    UserExist(1001,"用户已存在"),
    UserNotExist(1002,"用户不存在"),
    RoleExist(1101,"角色已存在"),
    RoleNotExist(1102,"角色不存在"),
    ;

    //非1非0
    public int code;

    public String msg;

    public int httpCode;

    ResultCodeMsg(int code, String msg){
        this(code,msg,HttpCode.DEFAULT_HTTP_CODE);
    }

    ResultCodeMsg(int code, String msg,HttpCode httpCode){
        this.code = code;
        this.msg = msg;
        this.httpCode = httpCode.httpCode;
    }

}

